-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
http2: make compat finished match http/1 #24347
Conversation
e651c5b
to
58be934
Compare
The interesting part here is that in http1 I think this discrepancy is also missing a test somewhere? @mcollina EDIT: See, fab97ee |
ae5a5f0
to
e164f4e
Compare
@jasnell can you help here? |
I think this is just a difference that we need to fix. |
I'm actually a bit unsure what happens if you call |
7a57643
to
d9312e2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you please add a unit test that shows what you are trying to achieve?
if the stream is finished, nothing happens on multiple Lines 683 to 684 in b32c5f0
If you are still unsure, have you trying preparing an example? |
This is if you have called |
Can you create an example to check this? |
Sorry @mcollina, I just spotted the notification on this. I'll queue this one up and take a look hopefully later today. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm sorry, but this is completely incorrect. There's a good reason that this makes a test fail.
@apapirovski care to expand on that? The failing test looks wrong for me: const server = createServer(mustCall((request, response) => {
strictEqual(response.finished, true);
response.writeHead(HTTP_STATUS_OK, { foo: 'bar' });
response.end('data', mustCall());
})); It test that |
a518fe2
to
252a03f
Compare
833e567
to
cd39f47
Compare
@Trott: CI failed due to merge conflict. Please try again. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM as a bug fix
This comment has been minimized.
This comment has been minimized.
@nodejs/build I seem to be having problems with node-test-binary-arm-12+ in multiple PR's. Even those that just touch docs? #31805 |
Thanks @ronag, don't treat this as a blocker for your code, it's a Jenkins problem on our end. @nodejs/build we're having a commit-ref propagation problem, in https://ci.nodejs.org/job/node-test-pull-request/29176/:
anyone got time to look at this one? @joaocgreis I bet you'd have the most insight and could see the problem quickest if you're available. |
CITGM: https://ci.nodejs.org/view/Node.js-citgm/job/citgm-smoker/2272/ (queued) |
Please do not use the "Resume build" when the PR changes. The "Resume build" only starts jobs that failed, so jobs that passed before will remain green, even if they would fail with the new changes. The "Resume build" feature is a source of problems, but it's the only way we have to reduce the impact of infra failures. Please use "Rebuild" instead when there are any changes in the PR. Both |
Landed in 8ba7a2f |
Looking at the http1 semantic the current http2 compat implementation of
finished
seems rather complicated and fragile? Also it doesn't match the semantics of http1.I have one http2 compat test failing which I don't quite undertand the purpose of. Am I missing something critical here?
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passesRefs: #24743
NOTE TO SELF: review cb behaviour when ending and destroyed. Is ´onStreamCloseResponse` required?